home *** CD-ROM | disk | FTP | other *** search
- /*
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ▒ ▒
- ▒ ▒
- ▒ Neuromancer's Graphics Library ▒
- ▒ Version 1.0c ▒
- ▒ ▒
- ▒ This example illustrates the copyblock routine. ▒
- ▒ This allows a block to be copied from src to dest ▒
- ▒ If src and dest overlap, checks will be performed ▒
- ▒ to ensure that transfer is done correctly. ▒
- ▒ ▒
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ▒ ▒
- ▒ Project: MTLIB01.LIB ▒
- ▒ DEMO9.CPP ▒
- ▒ ▒
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- */
-
- #include <iostream.h>
- #include <stdlib.h>
- #include <conio.h>
- #include <dos.h>
- #include "video.h"
- #include "bitmap.h"
-
- block page1;
-
- void main(void)
- {
- int xcor;
- int ycor;
-
- int xcor1;
- int ycor1;
-
- int xdir;
- int ydir;
-
- int xdir1;
- int ydir1;
-
- mtSetVGAMode(); //Set up VGA Mode
- mtClrScr(0);
-
- if ((page1=mtAllocPage(0,0,319,199))==NULL)
- {
- mtSetTextMode();
- cout << "Error setting up Page1"<<endl;
- }
-
- mtSetPage(PAGE_1);
- mtClrScr(45);
-
- mtSetPage(PAGE_0);
- mtSetWindow(0,0,319,199);
-
- mtWaitRetrace();
- mtLoadPCX("screen1.dat");
-
- if (mtCopyBlk(10,10,100,100,100,10,PAGE_0,PAGE_0)==1)
- {
- mtFreePage(PAGE_1);
- mtSetTextMode();
- cout <<"Error!!!"<<endl;
- exit(0);
- }
-
- if (mtCopyBlk(10,20,120,190,10,10,PAGE_0,PAGE_1)==1)
- {
- mtFreePage(PAGE_1);
- mtSetTextMode();
- cout <<"Error!!!"<<endl;
- exit(0);
- }
-
- getch();
-
- mtFlipPage(PAGE_1);
-
- getch();
-
- mtFreePage(PAGE_1);
-
- mtSetTextMode();
-
- cout << "Thank you for using the library!" << endl;
-
- exit(0);
-
- }
-
-
-
-
-
-
-
-